<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Vue入门</title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="app">
		  <input type="text" @keyup="showInfo($event)" placeholder="按下tab提示输入"/>
		</div>
		
		<script>
		Vue.config.productionTip = false
		var vm = new Vue({
		  el: '#app',
		  data: {
		    message: 'Hello Vue!'
		  },
		  methods:{
			  showInfo:function (e){
			  	// if(e.keyCode === 13) {
			  	//     console.log(e.target.value);
			  	// }
			  	console.log('input的值:',e.target.value);
			  	console.log('按键名:',e.key); //按下的名字
			  	console.log('按键keyCode:',e.keyCode); //按下的名字
				console.log('------------------------------')
			  }
		  }
		})
		</script>
	</body>
</html>
